3.228 \(\int \cos (a+b x) \csc ^2(c+b x) \, dx\)

Optimal. Leaf size=35 \[ \frac {\sin (a-c) \tanh ^{-1}(\cos (b x+c))}{b}-\frac {\cos (a-c) \csc (b x+c)}{b} \]

[Out]

-cos(a-c)*csc(b*x+c)/b+arctanh(cos(b*x+c))*sin(a-c)/b

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {4581, 2606, 8, 3770} \[ \frac {\sin (a-c) \tanh ^{-1}(\cos (b x+c))}{b}-\frac {\cos (a-c) \csc (b x+c)}{b} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x]*Csc[c + b*x]^2,x]

[Out]

-((Cos[a - c]*Csc[c + b*x])/b) + (ArcTanh[Cos[c + b*x]]*Sin[a - c])/b

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4581

Int[Cos[v_]*Csc[w_]^(n_.), x_Symbol] :> Dist[Cos[v - w], Int[Cot[w]*Csc[w]^(n - 1), x], x] - Dist[Sin[v - w],
Int[Csc[w]^(n - 1), x], x] /; GtQ[n, 0] && FreeQ[v - w, x] && NeQ[w, v]

Rubi steps

\begin {align*} \int \cos (a+b x) \csc ^2(c+b x) \, dx &=\cos (a-c) \int \cot (c+b x) \csc (c+b x) \, dx-\sin (a-c) \int \csc (c+b x) \, dx\\ &=\frac {\tanh ^{-1}(\cos (c+b x)) \sin (a-c)}{b}-\frac {\cos (a-c) \operatorname {Subst}(\int 1 \, dx,x,\csc (c+b x))}{b}\\ &=-\frac {\cos (a-c) \csc (c+b x)}{b}+\frac {\tanh ^{-1}(\cos (c+b x)) \sin (a-c)}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.10, size = 90, normalized size = 2.57 \[ -\frac {\cos (a-c) \csc (b x+c)}{b}+\frac {2 i \sin (a-c) \tan ^{-1}\left (\frac {(\cos (c)-i \sin (c)) \left (\cos (c) \cos \left (\frac {b x}{2}\right )-\sin (c) \sin \left (\frac {b x}{2}\right )\right )}{\sin (c) \cos \left (\frac {b x}{2}\right )+i \cos (c) \cos \left (\frac {b x}{2}\right )}\right )}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x]*Csc[c + b*x]^2,x]

[Out]

-((Cos[a - c]*Csc[c + b*x])/b) + ((2*I)*ArcTan[((Cos[c] - I*Sin[c])*(Cos[c]*Cos[(b*x)/2] - Sin[c]*Sin[(b*x)/2]
))/(I*Cos[c]*Cos[(b*x)/2] + Cos[(b*x)/2]*Sin[c])]*Sin[a - c])/b

________________________________________________________________________________________

fricas [B]  time = 0.47, size = 71, normalized size = 2.03 \[ -\frac {\log \left (\frac {1}{2} \, \cos \left (b x + c\right ) + \frac {1}{2}\right ) \sin \left (b x + c\right ) \sin \left (-a + c\right ) - \log \left (-\frac {1}{2} \, \cos \left (b x + c\right ) + \frac {1}{2}\right ) \sin \left (b x + c\right ) \sin \left (-a + c\right ) + 2 \, \cos \left (-a + c\right )}{2 \, b \sin \left (b x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)/sin(b*x+c)^2,x, algorithm="fricas")

[Out]

-1/2*(log(1/2*cos(b*x + c) + 1/2)*sin(b*x + c)*sin(-a + c) - log(-1/2*cos(b*x + c) + 1/2)*sin(b*x + c)*sin(-a
+ c) + 2*cos(-a + c))/(b*sin(b*x + c))

________________________________________________________________________________________

giac [B]  time = 0.47, size = 893, normalized size = 25.51 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)/sin(b*x+c)^2,x, algorithm="giac")

[Out]

-1/2*(4*(tan(1/2*a)^2*tan(1/2*c) - tan(1/2*a)*tan(1/2*c)^2 + tan(1/2*a) - tan(1/2*c))*log(abs(2*tan(1/2*b*x +
1/2*a)*tan(1/2*a)^2*tan(1/2*c) - 2*tan(1/2*b*x + 1/2*a)*tan(1/2*a)*tan(1/2*c)^2 + 2*tan(1/2*b*x + 1/2*a)*tan(1
/2*a) - 2*tan(1/2*a)^2 - 2*tan(1/2*b*x + 1/2*a)*tan(1/2*c) + 4*tan(1/2*a)*tan(1/2*c) - 2*tan(1/2*c)^2)/abs(2*t
an(1/2*b*x + 1/2*a)*tan(1/2*a)^2*tan(1/2*c) - 2*tan(1/2*b*x + 1/2*a)*tan(1/2*a)*tan(1/2*c)^2 + 2*tan(1/2*a)^2*
tan(1/2*c)^2 + 2*tan(1/2*b*x + 1/2*a)*tan(1/2*a) - 2*tan(1/2*b*x + 1/2*a)*tan(1/2*c) + 4*tan(1/2*a)*tan(1/2*c)
 + 2))/(tan(1/2*a)^2*tan(1/2*c)^2 + tan(1/2*a)^2 + tan(1/2*c)^2 + 1) - (tan(1/2*b*x + 1/2*a)*tan(1/2*a)^4*tan(
1/2*c)^4 - 2*tan(1/2*b*x + 1/2*a)*tan(1/2*a)^4*tan(1/2*c)^2 + 8*tan(1/2*b*x + 1/2*a)*tan(1/2*a)^3*tan(1/2*c)^3
 - 2*tan(1/2*a)^4*tan(1/2*c)^3 - 2*tan(1/2*b*x + 1/2*a)*tan(1/2*a)^2*tan(1/2*c)^4 + 2*tan(1/2*a)^3*tan(1/2*c)^
4 + tan(1/2*b*x + 1/2*a)*tan(1/2*a)^4 - 8*tan(1/2*b*x + 1/2*a)*tan(1/2*a)^3*tan(1/2*c) + 2*tan(1/2*a)^4*tan(1/
2*c) + 20*tan(1/2*b*x + 1/2*a)*tan(1/2*a)^2*tan(1/2*c)^2 - 12*tan(1/2*a)^3*tan(1/2*c)^2 - 8*tan(1/2*b*x + 1/2*
a)*tan(1/2*a)*tan(1/2*c)^3 + 12*tan(1/2*a)^2*tan(1/2*c)^3 + tan(1/2*b*x + 1/2*a)*tan(1/2*c)^4 - 2*tan(1/2*a)*t
an(1/2*c)^4 - 2*tan(1/2*b*x + 1/2*a)*tan(1/2*a)^2 + 2*tan(1/2*a)^3 + 8*tan(1/2*b*x + 1/2*a)*tan(1/2*a)*tan(1/2
*c) - 12*tan(1/2*a)^2*tan(1/2*c) - 2*tan(1/2*b*x + 1/2*a)*tan(1/2*c)^2 + 12*tan(1/2*a)*tan(1/2*c)^2 - 2*tan(1/
2*c)^3 + tan(1/2*b*x + 1/2*a) - 2*tan(1/2*a) + 2*tan(1/2*c))/((tan(1/2*b*x + 1/2*a)^2*tan(1/2*a)^2*tan(1/2*c)
- tan(1/2*b*x + 1/2*a)^2*tan(1/2*a)*tan(1/2*c)^2 + tan(1/2*b*x + 1/2*a)*tan(1/2*a)^2*tan(1/2*c)^2 + tan(1/2*b*
x + 1/2*a)^2*tan(1/2*a) - tan(1/2*b*x + 1/2*a)*tan(1/2*a)^2 - tan(1/2*b*x + 1/2*a)^2*tan(1/2*c) + 4*tan(1/2*b*
x + 1/2*a)*tan(1/2*a)*tan(1/2*c) - tan(1/2*a)^2*tan(1/2*c) - tan(1/2*b*x + 1/2*a)*tan(1/2*c)^2 + tan(1/2*a)*ta
n(1/2*c)^2 + tan(1/2*b*x + 1/2*a) - tan(1/2*a) + tan(1/2*c))*(tan(1/2*a)^2*tan(1/2*c) - tan(1/2*a)*tan(1/2*c)^
2 + tan(1/2*a) - tan(1/2*c))))/b

________________________________________________________________________________________

maple [B]  time = 2.16, size = 1062, normalized size = 30.34 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)/sin(b*x+c)^2,x)

[Out]

-1/b/(-1/2*cos(a)*sin(c)*tan(1/2*b*x+1/2*a)^2+1/2*cos(c)*sin(a)*tan(1/2*b*x+1/2*a)^2+tan(1/2*b*x+1/2*a)*cos(a)
*cos(c)+tan(1/2*b*x+1/2*a)*sin(a)*sin(c)+1/2*cos(a)*sin(c)-1/2*sin(a)*cos(c))/(cos(a)^2*cos(c)^2+cos(a)^2*sin(
c)^2+cos(c)^2*sin(a)^2+sin(a)^2*sin(c)^2)/(cos(a)*sin(c)-sin(a)*cos(c))*tan(1/2*b*x+1/2*a)*cos(a)^2*cos(c)^2-2
/b/(-1/2*cos(a)*sin(c)*tan(1/2*b*x+1/2*a)^2+1/2*cos(c)*sin(a)*tan(1/2*b*x+1/2*a)^2+tan(1/2*b*x+1/2*a)*cos(a)*c
os(c)+tan(1/2*b*x+1/2*a)*sin(a)*sin(c)+1/2*cos(a)*sin(c)-1/2*sin(a)*cos(c))/(cos(a)^2*cos(c)^2+cos(a)^2*sin(c)
^2+cos(c)^2*sin(a)^2+sin(a)^2*sin(c)^2)/(cos(a)*sin(c)-sin(a)*cos(c))*tan(1/2*b*x+1/2*a)*cos(a)*cos(c)*sin(a)*
sin(c)-1/b/(-1/2*cos(a)*sin(c)*tan(1/2*b*x+1/2*a)^2+1/2*cos(c)*sin(a)*tan(1/2*b*x+1/2*a)^2+tan(1/2*b*x+1/2*a)*
cos(a)*cos(c)+tan(1/2*b*x+1/2*a)*sin(a)*sin(c)+1/2*cos(a)*sin(c)-1/2*sin(a)*cos(c))/(cos(a)^2*cos(c)^2+cos(a)^
2*sin(c)^2+cos(c)^2*sin(a)^2+sin(a)^2*sin(c)^2)/(cos(a)*sin(c)-sin(a)*cos(c))*tan(1/2*b*x+1/2*a)*sin(a)^2*sin(
c)^2-1/b/(-1/2*cos(a)*sin(c)*tan(1/2*b*x+1/2*a)^2+1/2*cos(c)*sin(a)*tan(1/2*b*x+1/2*a)^2+tan(1/2*b*x+1/2*a)*co
s(a)*cos(c)+tan(1/2*b*x+1/2*a)*sin(a)*sin(c)+1/2*cos(a)*sin(c)-1/2*sin(a)*cos(c))/(cos(a)^2*cos(c)^2+cos(a)^2*
sin(c)^2+cos(c)^2*sin(a)^2+sin(a)^2*sin(c)^2)*cos(a)*cos(c)-1/b/(-1/2*cos(a)*sin(c)*tan(1/2*b*x+1/2*a)^2+1/2*c
os(c)*sin(a)*tan(1/2*b*x+1/2*a)^2+tan(1/2*b*x+1/2*a)*cos(a)*cos(c)+tan(1/2*b*x+1/2*a)*sin(a)*sin(c)+1/2*cos(a)
*sin(c)-1/2*sin(a)*cos(c))/(cos(a)^2*cos(c)^2+cos(a)^2*sin(c)^2+cos(c)^2*sin(a)^2+sin(a)^2*sin(c)^2)*sin(a)*si
n(c)+4/b/(2*cos(a)^2*cos(c)^2+2*cos(a)^2*sin(c)^2+2*cos(c)^2*sin(a)^2+2*sin(a)^2*sin(c)^2)/(-cos(a)^2*cos(c)^2
-cos(a)^2*sin(c)^2-cos(c)^2*sin(a)^2-sin(a)^2*sin(c)^2)^(1/2)*arctan(1/2*(2*(sin(a)*cos(c)-cos(a)*sin(c))*tan(
1/2*b*x+1/2*a)+2*cos(a)*cos(c)+2*sin(a)*sin(c))/(-cos(a)^2*cos(c)^2-cos(a)^2*sin(c)^2-cos(c)^2*sin(a)^2-sin(a)
^2*sin(c)^2)^(1/2))*cos(a)*sin(c)-4/b/(2*cos(a)^2*cos(c)^2+2*cos(a)^2*sin(c)^2+2*cos(c)^2*sin(a)^2+2*sin(a)^2*
sin(c)^2)/(-cos(a)^2*cos(c)^2-cos(a)^2*sin(c)^2-cos(c)^2*sin(a)^2-sin(a)^2*sin(c)^2)^(1/2)*arctan(1/2*(2*(sin(
a)*cos(c)-cos(a)*sin(c))*tan(1/2*b*x+1/2*a)+2*cos(a)*cos(c)+2*sin(a)*sin(c))/(-cos(a)^2*cos(c)^2-cos(a)^2*sin(
c)^2-cos(c)^2*sin(a)^2-sin(a)^2*sin(c)^2)^(1/2))*sin(a)*cos(c)

________________________________________________________________________________________

maxima [B]  time = 0.38, size = 450, normalized size = 12.86 \[ \frac {2 \, {\left (\sin \left (b x + 2 \, a\right ) + \sin \left (b x + 2 \, c\right )\right )} \cos \left (2 \, b x + a + 2 \, c\right ) - {\left (\cos \left (2 \, b x + a + 2 \, c\right )^{2} \sin \left (-a + c\right ) - 2 \, \cos \left (2 \, b x + a + 2 \, c\right ) \cos \relax (a) \sin \left (-a + c\right ) + \sin \left (2 \, b x + a + 2 \, c\right )^{2} \sin \left (-a + c\right ) - 2 \, \sin \left (2 \, b x + a + 2 \, c\right ) \sin \relax (a) \sin \left (-a + c\right ) + {\left (\cos \relax (a)^{2} + \sin \relax (a)^{2}\right )} \sin \left (-a + c\right )\right )} \log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \relax (c) + \cos \relax (c)^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \relax (c) + \sin \relax (c)^{2}\right ) + {\left (\cos \left (2 \, b x + a + 2 \, c\right )^{2} \sin \left (-a + c\right ) - 2 \, \cos \left (2 \, b x + a + 2 \, c\right ) \cos \relax (a) \sin \left (-a + c\right ) + \sin \left (2 \, b x + a + 2 \, c\right )^{2} \sin \left (-a + c\right ) - 2 \, \sin \left (2 \, b x + a + 2 \, c\right ) \sin \relax (a) \sin \left (-a + c\right ) + {\left (\cos \relax (a)^{2} + \sin \relax (a)^{2}\right )} \sin \left (-a + c\right )\right )} \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \relax (c) + \cos \relax (c)^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \relax (c) + \sin \relax (c)^{2}\right ) - 2 \, {\left (\cos \left (b x + 2 \, a\right ) + \cos \left (b x + 2 \, c\right )\right )} \sin \left (2 \, b x + a + 2 \, c\right ) - 2 \, \cos \relax (a) \sin \left (b x + 2 \, a\right ) - 2 \, \cos \relax (a) \sin \left (b x + 2 \, c\right ) + 2 \, \cos \left (b x + 2 \, a\right ) \sin \relax (a) + 2 \, \cos \left (b x + 2 \, c\right ) \sin \relax (a)}{2 \, {\left (b \cos \left (2 \, b x + a + 2 \, c\right )^{2} - 2 \, b \cos \left (2 \, b x + a + 2 \, c\right ) \cos \relax (a) + b \sin \left (2 \, b x + a + 2 \, c\right )^{2} - 2 \, b \sin \left (2 \, b x + a + 2 \, c\right ) \sin \relax (a) + {\left (\cos \relax (a)^{2} + \sin \relax (a)^{2}\right )} b\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)/sin(b*x+c)^2,x, algorithm="maxima")

[Out]

1/2*(2*(sin(b*x + 2*a) + sin(b*x + 2*c))*cos(2*b*x + a + 2*c) - (cos(2*b*x + a + 2*c)^2*sin(-a + c) - 2*cos(2*
b*x + a + 2*c)*cos(a)*sin(-a + c) + sin(2*b*x + a + 2*c)^2*sin(-a + c) - 2*sin(2*b*x + a + 2*c)*sin(a)*sin(-a
+ c) + (cos(a)^2 + sin(a)^2)*sin(-a + c))*log(cos(b*x)^2 + 2*cos(b*x)*cos(c) + cos(c)^2 + sin(b*x)^2 - 2*sin(b
*x)*sin(c) + sin(c)^2) + (cos(2*b*x + a + 2*c)^2*sin(-a + c) - 2*cos(2*b*x + a + 2*c)*cos(a)*sin(-a + c) + sin
(2*b*x + a + 2*c)^2*sin(-a + c) - 2*sin(2*b*x + a + 2*c)*sin(a)*sin(-a + c) + (cos(a)^2 + sin(a)^2)*sin(-a + c
))*log(cos(b*x)^2 - 2*cos(b*x)*cos(c) + cos(c)^2 + sin(b*x)^2 + 2*sin(b*x)*sin(c) + sin(c)^2) - 2*(cos(b*x + 2
*a) + cos(b*x + 2*c))*sin(2*b*x + a + 2*c) - 2*cos(a)*sin(b*x + 2*a) - 2*cos(a)*sin(b*x + 2*c) + 2*cos(b*x + 2
*a)*sin(a) + 2*cos(b*x + 2*c)*sin(a))/(b*cos(2*b*x + a + 2*c)^2 - 2*b*cos(2*b*x + a + 2*c)*cos(a) + b*sin(2*b*
x + a + 2*c)^2 - 2*b*sin(2*b*x + a + 2*c)*sin(a) + (cos(a)^2 + sin(a)^2)*b)

________________________________________________________________________________________

mupad [B]  time = 5.21, size = 252, normalized size = 7.20 \[ -\frac {\ln \left ({\mathrm {e}}^{a\,1{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,1{}\mathrm {i}}\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}-1\right )-\frac {{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}-1\right )\,1{}\mathrm {i}}{\sqrt {-{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}}}\right )\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}-1\right )}{2\,b\,\sqrt {-{\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}}}+\frac {\ln \left ({\mathrm {e}}^{a\,1{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,1{}\mathrm {i}}\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}-1\right )+\frac {{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}-1\right )\,1{}\mathrm {i}}{\sqrt {-{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}}}\right )\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}-1\right )}{2\,b\,\sqrt {-{\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}}}+\frac {{\mathrm {e}}^{a\,1{}\mathrm {i}+b\,x\,1{}\mathrm {i}}\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}+1\right )\,1{}\mathrm {i}}{b\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}-{\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x)/sin(c + b*x)^2,x)

[Out]

(log(exp(a*1i)*exp(b*x*1i)*(exp(a*2i)*exp(-c*2i) - 1) + (exp(a*2i)*exp(-c*2i)*(exp(a*2i)*exp(-c*2i) - 1)*1i)/(
-exp(a*2i)*exp(-c*2i))^(1/2))*(exp(a*2i - c*2i) - 1))/(2*b*(-exp(a*2i - c*2i))^(1/2)) - (log(exp(a*1i)*exp(b*x
*1i)*(exp(a*2i)*exp(-c*2i) - 1) - (exp(a*2i)*exp(-c*2i)*(exp(a*2i)*exp(-c*2i) - 1)*1i)/(-exp(a*2i)*exp(-c*2i))
^(1/2))*(exp(a*2i - c*2i) - 1))/(2*b*(-exp(a*2i - c*2i))^(1/2)) + (exp(a*1i + b*x*1i)*(exp(a*2i - c*2i) + 1)*1
i)/(b*(exp(a*2i - c*2i) - exp(a*2i + b*x*2i)))

________________________________________________________________________________________

sympy [B]  time = 102.51, size = 3266, normalized size = 93.31 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)/sin(b*x+c)**2,x)

[Out]

-Piecewise((0, Eq(b, 0) & (Eq(b, 0) | Eq(c, 0))), (log(tan(b*x/2))/b, Eq(c, 0)), (-log(tan(c/2) + tan(b*x/2))*
tan(c/2)**4*tan(b*x/2)/(b*tan(c/2)**4*tan(b*x/2) + b*tan(c/2)**3*tan(b*x/2)**2 - b*tan(c/2)**3 + b*tan(c/2)*ta
n(b*x/2)**2 - b*tan(c/2) - b*tan(b*x/2)) - log(tan(c/2) + tan(b*x/2))*tan(c/2)**3*tan(b*x/2)**2/(b*tan(c/2)**4
*tan(b*x/2) + b*tan(c/2)**3*tan(b*x/2)**2 - b*tan(c/2)**3 + b*tan(c/2)*tan(b*x/2)**2 - b*tan(c/2) - b*tan(b*x/
2)) + log(tan(c/2) + tan(b*x/2))*tan(c/2)**3/(b*tan(c/2)**4*tan(b*x/2) + b*tan(c/2)**3*tan(b*x/2)**2 - b*tan(c
/2)**3 + b*tan(c/2)*tan(b*x/2)**2 - b*tan(c/2) - b*tan(b*x/2)) + 2*log(tan(c/2) + tan(b*x/2))*tan(c/2)**2*tan(
b*x/2)/(b*tan(c/2)**4*tan(b*x/2) + b*tan(c/2)**3*tan(b*x/2)**2 - b*tan(c/2)**3 + b*tan(c/2)*tan(b*x/2)**2 - b*
tan(c/2) - b*tan(b*x/2)) + log(tan(c/2) + tan(b*x/2))*tan(c/2)*tan(b*x/2)**2/(b*tan(c/2)**4*tan(b*x/2) + b*tan
(c/2)**3*tan(b*x/2)**2 - b*tan(c/2)**3 + b*tan(c/2)*tan(b*x/2)**2 - b*tan(c/2) - b*tan(b*x/2)) - log(tan(c/2)
+ tan(b*x/2))*tan(c/2)/(b*tan(c/2)**4*tan(b*x/2) + b*tan(c/2)**3*tan(b*x/2)**2 - b*tan(c/2)**3 + b*tan(c/2)*ta
n(b*x/2)**2 - b*tan(c/2) - b*tan(b*x/2)) - log(tan(c/2) + tan(b*x/2))*tan(b*x/2)/(b*tan(c/2)**4*tan(b*x/2) + b
*tan(c/2)**3*tan(b*x/2)**2 - b*tan(c/2)**3 + b*tan(c/2)*tan(b*x/2)**2 - b*tan(c/2) - b*tan(b*x/2)) + log(tan(b
*x/2) - 1/tan(c/2))*tan(c/2)**4*tan(b*x/2)/(b*tan(c/2)**4*tan(b*x/2) + b*tan(c/2)**3*tan(b*x/2)**2 - b*tan(c/2
)**3 + b*tan(c/2)*tan(b*x/2)**2 - b*tan(c/2) - b*tan(b*x/2)) + log(tan(b*x/2) - 1/tan(c/2))*tan(c/2)**3*tan(b*
x/2)**2/(b*tan(c/2)**4*tan(b*x/2) + b*tan(c/2)**3*tan(b*x/2)**2 - b*tan(c/2)**3 + b*tan(c/2)*tan(b*x/2)**2 - b
*tan(c/2) - b*tan(b*x/2)) - log(tan(b*x/2) - 1/tan(c/2))*tan(c/2)**3/(b*tan(c/2)**4*tan(b*x/2) + b*tan(c/2)**3
*tan(b*x/2)**2 - b*tan(c/2)**3 + b*tan(c/2)*tan(b*x/2)**2 - b*tan(c/2) - b*tan(b*x/2)) - 2*log(tan(b*x/2) - 1/
tan(c/2))*tan(c/2)**2*tan(b*x/2)/(b*tan(c/2)**4*tan(b*x/2) + b*tan(c/2)**3*tan(b*x/2)**2 - b*tan(c/2)**3 + b*t
an(c/2)*tan(b*x/2)**2 - b*tan(c/2) - b*tan(b*x/2)) - log(tan(b*x/2) - 1/tan(c/2))*tan(c/2)*tan(b*x/2)**2/(b*ta
n(c/2)**4*tan(b*x/2) + b*tan(c/2)**3*tan(b*x/2)**2 - b*tan(c/2)**3 + b*tan(c/2)*tan(b*x/2)**2 - b*tan(c/2) - b
*tan(b*x/2)) + log(tan(b*x/2) - 1/tan(c/2))*tan(c/2)/(b*tan(c/2)**4*tan(b*x/2) + b*tan(c/2)**3*tan(b*x/2)**2 -
 b*tan(c/2)**3 + b*tan(c/2)*tan(b*x/2)**2 - b*tan(c/2) - b*tan(b*x/2)) + log(tan(b*x/2) - 1/tan(c/2))*tan(b*x/
2)/(b*tan(c/2)**4*tan(b*x/2) + b*tan(c/2)**3*tan(b*x/2)**2 - b*tan(c/2)**3 + b*tan(c/2)*tan(b*x/2)**2 - b*tan(
c/2) - b*tan(b*x/2)) + tan(c/2)**4*tan(b*x/2)/(b*tan(c/2)**4*tan(b*x/2) + b*tan(c/2)**3*tan(b*x/2)**2 - b*tan(
c/2)**3 + b*tan(c/2)*tan(b*x/2)**2 - b*tan(c/2) - b*tan(b*x/2)) - 2*tan(c/2)**3/(b*tan(c/2)**4*tan(b*x/2) + b*
tan(c/2)**3*tan(b*x/2)**2 - b*tan(c/2)**3 + b*tan(c/2)*tan(b*x/2)**2 - b*tan(c/2) - b*tan(b*x/2)) - 2*tan(c/2)
/(b*tan(c/2)**4*tan(b*x/2) + b*tan(c/2)**3*tan(b*x/2)**2 - b*tan(c/2)**3 + b*tan(c/2)*tan(b*x/2)**2 - b*tan(c/
2) - b*tan(b*x/2)) - tan(b*x/2)/(b*tan(c/2)**4*tan(b*x/2) + b*tan(c/2)**3*tan(b*x/2)**2 - b*tan(c/2)**3 + b*ta
n(c/2)*tan(b*x/2)**2 - b*tan(c/2) - b*tan(b*x/2)), True))*sin(a) + Piecewise((zoo*x, Eq(b, 0) & Eq(c, 0)), (-1
/(b*sin(b*x)), Eq(c, 0)), (x/sin(c)**2, Eq(b, 0)), (4*log(tan(c/2) + tan(b*x/2))*tan(c/2)**4*tan(b*x/2)/(2*b*t
an(c/2)**5*tan(b*x/2) + 2*b*tan(c/2)**4*tan(b*x/2)**2 - 2*b*tan(c/2)**4 + 2*b*tan(c/2)**2*tan(b*x/2)**2 - 2*b*
tan(c/2)**2 - 2*b*tan(c/2)*tan(b*x/2)) + 4*log(tan(c/2) + tan(b*x/2))*tan(c/2)**3*tan(b*x/2)**2/(2*b*tan(c/2)*
*5*tan(b*x/2) + 2*b*tan(c/2)**4*tan(b*x/2)**2 - 2*b*tan(c/2)**4 + 2*b*tan(c/2)**2*tan(b*x/2)**2 - 2*b*tan(c/2)
**2 - 2*b*tan(c/2)*tan(b*x/2)) - 4*log(tan(c/2) + tan(b*x/2))*tan(c/2)**3/(2*b*tan(c/2)**5*tan(b*x/2) + 2*b*ta
n(c/2)**4*tan(b*x/2)**2 - 2*b*tan(c/2)**4 + 2*b*tan(c/2)**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 - 2*b*tan(c/2)*tan
(b*x/2)) - 4*log(tan(c/2) + tan(b*x/2))*tan(c/2)**2*tan(b*x/2)/(2*b*tan(c/2)**5*tan(b*x/2) + 2*b*tan(c/2)**4*t
an(b*x/2)**2 - 2*b*tan(c/2)**4 + 2*b*tan(c/2)**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 - 2*b*tan(c/2)*tan(b*x/2)) -
4*log(tan(b*x/2) - 1/tan(c/2))*tan(c/2)**4*tan(b*x/2)/(2*b*tan(c/2)**5*tan(b*x/2) + 2*b*tan(c/2)**4*tan(b*x/2)
**2 - 2*b*tan(c/2)**4 + 2*b*tan(c/2)**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 - 2*b*tan(c/2)*tan(b*x/2)) - 4*log(tan
(b*x/2) - 1/tan(c/2))*tan(c/2)**3*tan(b*x/2)**2/(2*b*tan(c/2)**5*tan(b*x/2) + 2*b*tan(c/2)**4*tan(b*x/2)**2 -
2*b*tan(c/2)**4 + 2*b*tan(c/2)**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 - 2*b*tan(c/2)*tan(b*x/2)) + 4*log(tan(b*x/2
) - 1/tan(c/2))*tan(c/2)**3/(2*b*tan(c/2)**5*tan(b*x/2) + 2*b*tan(c/2)**4*tan(b*x/2)**2 - 2*b*tan(c/2)**4 + 2*
b*tan(c/2)**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 - 2*b*tan(c/2)*tan(b*x/2)) + 4*log(tan(b*x/2) - 1/tan(c/2))*tan(
c/2)**2*tan(b*x/2)/(2*b*tan(c/2)**5*tan(b*x/2) + 2*b*tan(c/2)**4*tan(b*x/2)**2 - 2*b*tan(c/2)**4 + 2*b*tan(c/2
)**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 - 2*b*tan(c/2)*tan(b*x/2)) + tan(c/2)**6*tan(b*x/2)/(2*b*tan(c/2)**5*tan(
b*x/2) + 2*b*tan(c/2)**4*tan(b*x/2)**2 - 2*b*tan(c/2)**4 + 2*b*tan(c/2)**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 - 2
*b*tan(c/2)*tan(b*x/2)) - 2*tan(c/2)**5/(2*b*tan(c/2)**5*tan(b*x/2) + 2*b*tan(c/2)**4*tan(b*x/2)**2 - 2*b*tan(
c/2)**4 + 2*b*tan(c/2)**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 - 2*b*tan(c/2)*tan(b*x/2)) - tan(c/2)**4*tan(b*x/2)/
(2*b*tan(c/2)**5*tan(b*x/2) + 2*b*tan(c/2)**4*tan(b*x/2)**2 - 2*b*tan(c/2)**4 + 2*b*tan(c/2)**2*tan(b*x/2)**2
- 2*b*tan(c/2)**2 - 2*b*tan(c/2)*tan(b*x/2)) - tan(c/2)**2*tan(b*x/2)/(2*b*tan(c/2)**5*tan(b*x/2) + 2*b*tan(c/
2)**4*tan(b*x/2)**2 - 2*b*tan(c/2)**4 + 2*b*tan(c/2)**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 - 2*b*tan(c/2)*tan(b*x
/2)) + 2*tan(c/2)/(2*b*tan(c/2)**5*tan(b*x/2) + 2*b*tan(c/2)**4*tan(b*x/2)**2 - 2*b*tan(c/2)**4 + 2*b*tan(c/2)
**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 - 2*b*tan(c/2)*tan(b*x/2)) + tan(b*x/2)/(2*b*tan(c/2)**5*tan(b*x/2) + 2*b*
tan(c/2)**4*tan(b*x/2)**2 - 2*b*tan(c/2)**4 + 2*b*tan(c/2)**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 - 2*b*tan(c/2)*t
an(b*x/2)), True))*cos(a)

________________________________________________________________________________________